home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / SASC_6.0_Disk_3.adf / Compiler_headers / Include / signal.h < prev    next >
C/C++ Source or Header  |  1992-07-30  |  1KB  |  69 lines

  1. /* Copyright (c) 1992 SAS Institute, Inc., Cary, NC USA */
  2. /* All Rights Reserved */
  3.  
  4.  
  5. #ifndef _SIGNAL_H
  6. #define _SIGNAL_H 1
  7.  
  8. /**
  9. *
  10. * This header file contains definitions needed by the signal function.
  11. *
  12. **/
  13.  
  14. /**
  15. *
  16. * NSIG supposedly defines the number of signals recognized.  However,
  17. * since not all signals are actually implemented under AmigaDOS, it actually
  18. * is the highest legal signal number plus one.
  19. *
  20. */
  21.  
  22. #define _NSIG     9
  23. #define _SIG_MAX  8
  24.  
  25. #ifndef _STRICT_ANSI
  26. #define NSIG    _NSIG
  27. #define SIG_MAX _SIG_MAX
  28. #endif
  29.             
  30. /**
  31. *
  32. * The following symbols are the defined signals.
  33. *
  34. */
  35.  
  36. #define SIGABRT  1      /*  Abnormal termination, abort()  */
  37. #define SIGFPE   2      /*  Floating point exception  */
  38. #define SIGILL   3      /*  Illegal instruction  */
  39. #define SIGINT   4      /*  Interrupt from AmigaDOS, ^C or ^D  */
  40. #define SIGSEGV  5      /*  Segmentation violation  */
  41. #define SIGTERM  6      /*  Termination request  */
  42.  
  43. /***
  44. *
  45. * The following symbols are the special forms for the function pointer
  46. * argument.  They specify certain standard actions that can be performed
  47. * when the signal occurs.
  48. *
  49. ***/
  50.  
  51. #define SIG_DFL (void (*)(int)) 0    /* default action */
  52. #define SIG_IGN (void (*)(int)) 1    /* ignore the signal */
  53. #define SIG_ERR (void (*)(int)) (-1)    /* error return */
  54.  
  55. /***
  56. *
  57. * Function declarations
  58. *
  59. ***/
  60.  
  61. extern void (*signal(int,void (*)(int)))(int);
  62. extern int raise(int);
  63.  
  64. extern void (*__sigfunc[_NSIG])(int);
  65.  
  66. typedef int sig_atomic_t;
  67.  
  68. #endif
  69.